Field of the Invention
The present invention relates to a three dimensional measurement apparatus, a control method for a three dimensional measurement apparatus, and a storage medium.
Description of the Related Art
A space coding pattern projecting technique is known as a method for measuring the shape of a measurement subject from image information using the principle of triangulation. A plurality of lattice patterns are projected onto a measurement subject by a projection device such as a projector, images of the plurality of lattice patterns are captured by an image capturing device, and the shape of the measurement subject is measured from light and dark positions in the lattice pattern and the geometric relationship between the image capturing device and the projection device. In the space coding pattern projection technique, the three-dimensional shape of the measurement subject is measured by analyzing codes associated with the light and dark positions in the projected patterns as heights from a reference surface at each of points on the measurement subject. However, in three-dimensional shape measurement using such a space coding pattern projection technique, problems can arise in the case where regions having various reflection characteristics, such as low-reflection regions and high-reflection regions, are broadly distributed across the surface of the measurement subject. For example, it may not be possible to cover a broad reflection distribution range even if the light intensity of a light source for projecting the patterns or the exposure of the image capturing device is adjusted.
In response to this, Japanese Patent Laid-Open No. 62-21011 discloses a method that uses an image capturing unit to obtain grayscale image data having gradations by capturing an image of a light section line generated through a light-section method that uses slit light. An image is composited from line light images captured under a plurality of imaging conditions by replacing the luminances of saturated pixels with the highest luminance value that is under a saturation luminance, and the three-dimensional shape of the measurement subject is measured from that image, making it possible to measure the shape of a measurement subject having a broad range of reflection characteristics.
Meanwhile, according to Japanese Patent Laid-Open No. 2007-271530, the shape of a measurement subject is measured by using a space coding pattern projection technique to associate space codes from pattern intensity images captured under a plurality of imaging conditions and then integrate the space codes under the conditions where the average luminance of the image is the highest.
However, the technique disclosed in Japanese Patent Laid-Open No. 62-21011 simply replaces luminances in an image with the highest luminance value that is not saturated. As such, there is a problem in that when using a space coding pattern projection technique and associating codes with light and dark positions in the pattern, erroneous associations can occur, which makes it difficult to accurately measure a three-dimensional shape.
Meanwhile, according to the technique disclosed in Japanese Patent Laid-Open No. 2007-271530, it is necessary to associate and integrate space codes from pattern intensity images captured under a plurality of imaging conditions, which involves a high amount of processing and uses a large amount of system memory. There is thus a problem in that it is difficult to measure a three-dimensional shape quickly.
The present invention provides a technique for quickly and accurately measuring the three-dimensional shape of a measurement subject.